<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .box1{
            width: 300px;
            height: 300px;
            background-color: hotpink;
            overflow: hidden;
        }
        .box2{
            width: 200px;
            height: 200px;
            border: 1px black solid;
            /*单方向的设置*/
            /*margin-left: -100px;
            margin-top: 20px;*/
            margin-top: 40px;
        }
    </style>
</head>
<body>
<div class="box1">
    <div class="box2">

    </div>
</div>
</body>
</html>